package com.candy.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test01 {
    public static void main(String[] args) {
//        Student stu=new Student();
//        stu.setName("tom");
//        stu.sayHi();
      ApplicationContext app=new ClassPathXmlApplicationContext("applicationContext.xml");
      Student stu= (Student) app.getBean("Student");
      stu.setName("tom");
      stu.sayHi();
    }
}
